﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Ref引用对像 : System.Web.UI.Page
{
    int xb = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
          xb = 12121;
        
        cfun(ref xb);
        int sb = xb;
        int xcc = sb;
        cfun(ref sb);
        var sbd = 0;


        //字节操作
        byte[] arr = new byte[] { 1, 2 };

      int xbx=   System.BitConverter.ToInt16(arr, 0);

      byte[] arrx = System.BitConverter.GetBytes((ushort)12345);

      arr[0] = arrx[0];
      arr[1] = arrx[1];
      xbx = System.BitConverter.ToInt16(arr, 0);




    }

    public void cfun(ref int x)
    {
        x = x + 999;


    }

}